#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct Dog Dog;
struct Dog {
  char name[10];
  int age;
  double weight;
};

char *say(Dog *d) {
  static char info[100];
  sprintf(info, "name = %s\tage = %d\tweight = %lf\n", d->name, d->age,
          d->weight);
  return info;
}

int main(int argc, char *argv[]) {
  /* 结构体练习
   */
  Dog d;
  strcpy(d.name, "大黄");
  d.age = 10;
  d.weight = 23.0;
  char *info = say(&d);
  printf("%s\n", info);
  return EXIT_SUCCESS;
}
